package com.yuanjin.util;

import java.util.ArrayList;
import java.util.Vector;

import com.yuanjin.models.FriendsShowItem;

import android.R.integer;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.text.format.DateFormat;

/**
 * @author zhan414
 * @SharedPreference "username":用户名 --"password"：用户登录密码
 */
public class Yuanjin {
	public static String username = "";
	private static double currenttime;
	private static double oldtime = 0;
	public static int ALBUM_OK = 1;// 成功打开相册
	public static String YuanjinSharedPreference = "yuanjin_sharedpreference";
	// 缓存图片和图片的绝对路径
	public static ArrayList<Object> imageListCache = new ArrayList<Object>();
	public static ArrayList<String> imagePathList = new ArrayList<String>();
	public static int uploadNum = 0;// 存储已上传的图片张数
	public static Vector<FriendsShowItem> friendsShowItemList=new Vector<FriendsShowItem>();// 朋友圈item存储

	public static String test_name = "";
	public static String test_message = "";

	// // 头像缩略图
	// public static String headicon_absolutePath = "headicon_absolutePath";
	// // 头像原图
	// public static String headicon_thumbnailPath = "headicon_thumbnailPath";

	// SharedPreferences sp = getSharedPreferences("yuanjin_sharedpreference",
	// MODE_PRIVATE);

	public static String getTime() {
		currenttime = System.currentTimeMillis();
		// ��ȡ���ӻ�ʱ������
		String dateTime = DateFormat.format("yyyy.MM.dd hh.mm",
				System.currentTimeMillis()).toString();
		// ÿ��5������ʾһ��ʱ��
		if (currenttime - oldtime >= 5 * 60 * 1000) {
			oldtime = currenttime;
			return dateTime;
		} else {
			return "";
		}
	}
}
